﻿using System;

using MonoTorrent.Client;

namespace SBPweb.RouTorrent.Business
{

    public class PeerStateChangedEventArgs : EventArgs
    {

        #region Private fields

        private TorrentManager mTorrentInfo;
        private int mPieceCount;

        #endregion

        #region Constructor logic

        public PeerStateChangedEventArgs(TorrentManager manager, PeersAddedEventArgs e)
            : this(manager, e.Count)
        {
        }

        public PeerStateChangedEventArgs(TorrentManager manager, int count)
        {
            mTorrentInfo = manager;
            mPieceCount = count;
        }

        #endregion

        #region Public properties

        public TorrentManager DownloadManager
        {
            get
            {
                return mTorrentInfo;
            }
        }

        public int PieceCount
        {
            get
            {
                return mPieceCount;
            }
        }

        #endregion

    }

    public delegate void PeerStateChangedHandler(object sender, PeerStateChangedEventArgs e);

}